﻿<!DOCTYPE html>
<!--管理制度--填加-->
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="/static/js/common.js"></script>

    <meta charset="utf-8" />
    <title></title>
</head>

<body>
    <div id="app" class="popupW100" v-cloak>
        <!-- class="popupW100"为label宽度为100px，共有popupW50、popupW100、popupW150、popupW200可选 -->
        <el-form label-position="right" :model="Form" status-icon :rules="rules" ref="ruleForm" label-width="100px"
                 size="mini">
            <el-row>
                评价审批流程记录
                <br />                -------------------------------------------------------------------------------------------------------------------
            </el-row>
            <el-row>
                <!--发布时间-->
                <el-col :span="11">
                    <p class="main-label">{{LawRegulationsFitAdministration.FBSJ+mark.m}}</p>
                    <p class="lh35">{{Form.createTime}}</p>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="11">
                    <p class="main-label">{{LawRegulationsFitAdministration.FBRY+mark.m}}</p>
                    <p class="lh35">{{Form.mark03}}</p>
                </el-col>
            </el-row>
            <br />
            <el-row>
                <!--审核时间-->
                <el-col :span="11">
                    <p class="main-label">{{LawRegulationsFitAdministration.SHSJ+mark.m}}</p>
                    <p class="lh35">{{Form.auditDate}}</p>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="11">
                    <p class="main-label">{{LawRegulationsFitAdministration.SHRY+mark.m}}</p>
                    <p class="lh35">{{Form.mark01}}</p>
                </el-col>
            </el-row>
            <br />
            <el-row>
                <!--批准时间-->
                <el-col :span="11">
                    <p class="main-label">{{LawRegulationsFitAdministration.PZSJ+mark.m}}</p>
                    <p class="lh35">{{Form.approveDate}}</p>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="11">
                    <p class="main-label">{{LawRegulationsFitAdministration.PZRY+mark.m}}</p>
                    <p class="lh35">{{Form.mark02}}</p>
                </el-col>
            </el-row>
            <el-row type="flex" justify="end">
                <el-form-item>
                    <!--<el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnSave}}</el-button>-->
                    <!--<el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnCommit}}</el-button>-->
                    <el-button type="primary" @click="parent.ListItem.dialogVisible=false">{{col.btnBack}}</el-button>
                </el-form-item>

            </el-row>
        </el-form>
    </div>
    <script type="text/javascript">
        var uploadText = "请选择上传文件";
        Vue.component('treeselect', VueTreeselect.Treeselect)
        //var gutid = gutid();//取随机主键
        //function gutid() {
        //    return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
        //        var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
        //        return v.toString(16);
        //    });
        //};

        //取序号
      //  var gunstN = parent.$ManagementSystem.Arrays.length
        //var gutNum = gunstN + 1;


        //var gutNum = gutNum();
        //function gutNum() {
        //    ufoiNum = ufoiNum + 1;
        //    return ufoiNum;
        //};




        var app = new Vue({
            el: '#app',
            data: {
                //父业传参
                id: '',
                show: '',
                FL_SystemFileLevel: [],
                Person: [],
                //获取下拉菜单sex
                // sex: [],
                //业务表单内容
                Form: {
                    fileLeve: '',
                    //id: guidEmpty,
                    id: guidEmpty,
                    // MS_Id: gutNum, // '999999',
                    MS_Id: '',
                    MS_InstitutionName: '',
                    MS_FileNo: '',
                    MS_Sort: '',
                    LBSorts: '',
                    Dycle: '',
                    MS_ReviewDate: '',
                    MS_ImplementationDate: '',
                    attachment: '',
                    attachmentName: '',
                    IsHSE: '',  //是否是HSE类别
                    RDepartments: '',//相关部门
                    multiple: true,
                    Department: [],
                    departmentId1: null,
                    FL_SystemDept: [],
                    MS_ReviewCycle: '',
                    MS_RevisionTime: '',
                    Person: [],
                    PJPerSon: '',
                    powerid: guidEmpty,
                   // editRead:'',
                 
                },
                //  LBSorts: [],
                //  IsHSE: [],
                //  RDepartments: [],
                //表单验证
                rules: {
                    //MS_InstitutionName: [
                    //    verification.NotNull
                    //],
                    //MS_FileNo: [
                    //    verification.NotNull
                    //],
                    ////MS_Sort: [
                    ////    verification.NotNull,
                    ////],
                    ////MS_IsHSE: [
                    ////    verification.NotNull,
                    ////],
                    //Dycle: [
                    //    verification.NotNull,
                    //],
                    //MS_ImplementationDate: [
                    //    verification.NotNull,
                    //],
                    //MS_ReviewDate: [
                    //    verification.NotNull,
                    //],
                    //MS_RelevantDepartments: [
                    //    verification.NotNull,
                    //],

                },
                //IsCAM_Compliance: [],

            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },

                attachmentHandle: function (response, fileid, fileName) {

                    console.log('fileid', fileid)
                    console.log('fileName', fileName)

                    this.Form.attachment = fileid;
                    this.Form.attachmentName = fileName;

                    console.log(' this.Form.attachment', this.Form.attachment)
                    console.log(' this.Form.attachmentName', this.Form.attachmentName)

                },
                handleRemove: function (file) {
                    console.log(file);
                },
                handlePreview: function (file) {
                    console.log(file.name);
                    window.open(file.url)
                },
                //上传附件文件的校验
                //CoursewareUploadbeforeupload: function (file) {
                //    var testmsg = file.name.substring(file.name.lastIndexOf('.') + 1)
                //    //将附件名赋值到label上
                //    this.Form.MS_InstitutionName = file.name;
                //    const extension = testmsg === 'doc'
                //    const extension2 = testmsg === 'pdf'
                //    const isLt10M = file.size / 1024 / 1024 < 10
                //    if (!extension && !extension2) {
                //        this.$message({
                //            message: '上传文件只能是 doc、pdf格式!',
                //            type: 'warning'
                //        });
                //    }
                //    if (!isLt10M) {
                //        this.$message({
                //            message: '上传文件大小不能超过 10MB!',
                //            type: 'warning'
                //        });
                //    }
                //    if (extension || extension2 && isLt10M)
                //        submitUpload(this, 'upload')
                //    return extension || extension2 && isLt10M
                //},
                btnAttachmentUpload: function () {
                    //若更换文件则将文件名字更换触发条件--先删除上一个文件,后添加一个文件
                    if (this.fileAttachmentUpload != uploadText) {
                        this.$refs.Attachmentupload.clearFiles();
                        this.fileAttachmentUpload = file.name;
                    }
                    else {

                    }
                    this.$refs.Attachmentupload.submit();
                },

                input: function (value) {
                    this.Form.Department = value;
                },
                //人员类别
                getPersonData: function () {
                    var mythis = this;
                    myAjax("post", mythis, '/api/FL_Evaluation/GetUserList', { model: {}, offset: 0, limit: 100 }, function (response) {
                        mythis.Person = response.data;
                    });
                },
                //提交数据
                onSubmitForm: function (formName) {
                    //console.log("xxxxx890xxxxxxx");
                    var mythis = this;
                    this.$refs[formName].validate(function (valid) {
                        //验证通过
                        if (valid) {

                            onSubmitForm(this, '/api/FL_Evaluation/SavePS', mythis.Form);
                        } else {
                            //验证失败
                            showMessage(msg.NoMust, 'error');

                            return false;
                        }
                    });
                },
                getData: function () {
                    //console.log("获取编辑数据开始");
                    getData(this, '/api/FL_Evaluation/get?id=' + this.id);
                    //this.Form.sex = this.Form.sex + "";
                    //console.log(this.id);
                    //console.log("获取编辑数据结束");



                },
            },
            mounted: function () {
                this.powerid = getUrlParam("t");
                this.getPersonData();
                this.id = getUrlParam("id");
                this.getData();
                  
               
                //if (this.powerid == "sh" || this.powerid == "tj") {
                //    this.editRead = false;
                //}
                //else {
                //    this.editRead = true;
                //}
            },
          
        });
    </script>
</body>

</html>